//
//  BaseModel.m
//  B-72K
//
//  Created by sos on 16/3/7.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
- (instancetype)initWithDic:(NSDictionary *)Dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:Dic];
    }
    return self;
}

+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    id m = [[[self class] alloc] initWithDic:dic];
    return m;
}

+ (NSMutableArray *)modelHanderWithArray:(NSArray *)arr
{
    NSMutableArray *mArr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        id m = [[self class] modelWithDic:dic];
        [mArr addObject:m];
    }
    return mArr;
}


@end
